3 |
How do I change the control's border, using your EBN files
/* Copy and paste the following directives to your header file as it defines the namespace 'EXSTATUSBARLib' for the library: 'ExStatusBar 1.0 Control Library' #import <ExStatusBar.dll> using namespace EXSTATUSBARLib; */ EXSTATUSBARLib::IStatusBarPtr spStatusBar1 = GetDlgItem(IDC_STATUSBAR1)->GetControlUnknown(); spStatusBar1->BeginUpdate(); spStatusBar1->GetVisualAppearance()->Add(1,"c:\\exontrol\\images\\normal.ebn"); spStatusBar1->PutAppearance(EXSTATUSBARLib::AppearanceEnum(0x1000000)); spStatusBar1->GetVisualAppearance()->Add(4,"c:\\exontrol\\images\\border.ebn"); spStatusBar1->GetVisualAppearance()->Add(5,"CP:4 1 1 -1 -1"); spStatusBar1->PutBackColorPanels(0x5000000); spStatusBar1->PutFormat(L"1,2,3,4,(5/6/7/8)"); spStatusBar1->PutDebug(VARIANT_TRUE); spStatusBar1->EndUpdate(); |
2 |
How do I remove the control's border
|
1 |
How can I change the control's font
/* Copy and paste the following directives to your header file as it defines the namespace 'EXSTATUSBARLib' for the library: 'ExStatusBar 1.0 Control Library' #import <ExStatusBar.dll> using namespace EXSTATUSBARLib; */ EXSTATUSBARLib::IStatusBarPtr spStatusBar1 = GetDlgItem(IDC_STATUSBAR1)->GetControlUnknown(); spStatusBar1->BeginUpdate(); spStatusBar1->GetVisualAppearance()->Add(4,"c:\\exontrol\\images\\border.ebn"); spStatusBar1->GetVisualAppearance()->Add(5,"CP:4 1 1 -1 -1"); spStatusBar1->PutBackColorPanels(0x5000000); /* Includes the definition for CreateObject function like follows: #include <comdef.h> IUnknownPtr CreateObject( BSTR Object ) { IUnknownPtr spResult; spResult.CreateInstance( Object ); return spResult; }; */ /* Copy and paste the following directives to your header file as it defines the namespace 'stdole' for the library: 'OLE Automation' #import <stdole2.tlb> */ stdole::FontPtr f = ::CreateObject(L"StdFont"); f->PutName(L"Verdana"); f->PutSize(_variant_t(long(12))); spStatusBar1->PutFont(IFontDispPtr(((stdole::FontPtr)(f)))); spStatusBar1->PutFormat(L"\"static text\"[fg=255][a=17],11,22,(33/44)"); spStatusBar1->EndUpdate(); |